#pragma once

#include <vector>
#include <complex>



class CSignal;
class CSamplingInfo;

class CSignalGenerationInfo
{
	std::vector<double> Frequencies;
	std::vector<double> Amplitudes;
	int fOscillatorCount;
	int fSampleCount;
	double fNoiseAmplitude;
	double fTotalObservationTime;
	double fPhase;

public:
	CSignalGenerationInfo(double TotalObservationTime, int SampleCount);

	CSignal GenerateSignal();

	void AddOscillator(double Frequency, double Amplitude);
	int OscillatorCount();
	int SampleCount();
	double NoiseAmplitude();
	void NoiseAmplitude(double value);
	double TotalObservationTime();
	double GetFrequency(int Oscillator);
	double GetAmplitude(int Oscillator);
	double Phase();
	void Phase(double value);
};



class CSignal
{
	std::vector<std::complex<double> > fSignal;
	std::vector<double> fTimeVector;
	int fSampleCount;
	double fTotalObservationTime;

public:
	CSignal(std::vector<std::complex<double> > &Signal, std::vector<double> &TimeVector, int SampleCount, double TotalObservationTime);

	void GetSignalSamples(double *Re, double *Im, CSamplingInfo &SamplingInfo);

	std::vector<std::complex<double> > Signal();
	std::vector<double> TimeVector();
	int SampleCount();
	double TotalObservationTime();
	double GetDeltaT();
};


class CSamplingGenerationInfo
{
	double fBurst0DeltaT;
	int fPulsesPerBurst;
	int fNumberOfBursts;
	std::vector<double> StaggerFactors;
	std::vector<double> BurstPauseTimes;

public:
	CSamplingGenerationInfo(double Burst0DeltaT, int PulsesPerBurst);

	CSamplingInfo GenerateSampling();

	void AddBurst(double StaggerFactor, double BurstPauseTime);

	int NumberOfBursts();
	double GetStaggerFactor(int Burst);
	double GetBurstPauseTime(int Burst);
	int PulsesPerBurst();
	double Burst0DeltaT();
};



class CSamplingInfo
{
	std::vector<double> fTimeVector;
	std::vector<double> SampleFrequencies;
	double fTotalObservationTime;
	std::vector <double> DeltaT;
	int fTotalSampleCount;

public:
	CSamplingInfo(std::vector<double> &TimeVector, std::vector<double> &SampleFrequencies, double TotalObservationTime, std::vector<double> &DeltaT, int TotalSampleCount);

	double TotalObservationTime();
	double GetSampleFrequency(int Burst);
	std::vector<double> TimeVector();
	double TimeVector(int Index);
	double GetDeltaT(int Burst);
	int TotalSampleCount();
};



